package com.ruoyi.chat.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.chat.domain.Following;
import com.ruoyi.jwyz.domain.Post;
import com.ruoyi.jwyz.dto.TargetUserResult;

/**
 * 关注Mapper接口
 * 
 * @author lxp
 * @date 2023-03-31
 */
public interface FollowingMapper extends BaseMapper<Following>
{
    /**
     * 查询关注
     * 
     * @param id 关注主键
     * @return 关注
     */
    public Following selectFollowingById(Long id);

    /**
     * 查询关注列表
     * 
     * @param following 关注
     * @return 关注集合
     */
    public List<Following> selectFollowingList(Following following);

    /**
     * 新增关注
     * 
     * @param following 关注
     * @return 结果
     */
    public int insertFollowing(Following following);

    /**
     * 修改关注
     * 
     * @param following 关注
     * @return 结果
     */
    public int updateFollowing(Following following);

    /**
     * 删除关注
     * 
     * @param id 关注主键
     * @return 结果
     */
    public int deleteFollowingById(Long id);

    /**
     * 批量删除关注
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFollowingByIds(Long[] ids);

    List<TargetUserResult> selectFollowingListByUserId(Long userId);
}
